home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
EnigmA Amiga Run 1997 May
/
EnigmA AMIGA RUN 18 (1997)(G.R. Edizioni)(IT)[!][issue 1997-05][EAR-CD II].iso
/
earcd
/
util
/
dir
/
managers.lha
/
Managers
/
Dir
/
Dir.g
< prev
next >
Wrap
Text File
|
1997-01-15
|
7KB
|
361 lines
G4C ; Contains the 3 pop-up GUIS
; This is the RMB pop-up gui (i.e. pops up on clicking the Right Mouse Button)
WinBig 0 0 80 105 ""
WinType 00001000
winonmouse 30 22
xOnRMB
guiclose Dir.g
xOnInactive
guiclose Dir.g
xOnOpen ; upon opening the window
setvar mlv_id $$LV_ID ; get the listview's id
if $mlv_id = 2 ; set the copy/move gadgets pointing
setgad Dir.g 1 HIDE ; correctly according to the LV's id.
setgad Dir.g 2 HIDE
setgad Dir.g 11 show
setgad Dir.g 22 show
setvar mlv_destid 1 ; get the destination lv's id
setvar mlv_destdir $lv_dir1 ; and the destination dir (we'll need them)
else
setgad Dir.g 11 HIDE
setgad Dir.g 22 HIDE
setgad Dir.g 1 show
setgad Dir.g 2 show
setvar mlv_destid 2
setvar mlv_destdir $lv_dir2
endif
redraw Dir.g
xOnQuit
delvar mlv_#?
;=============================== Next GUI button
xbutton 0 0 0 15 More..
guiopen Dir.g3 ; open an other gui with more options
guiclose Dir.g
;=============================== copy button
xbutton 0 15 0 15 Copy->
gadid 1
gosub Dir.g copy
xbutton 0 15 0 15 <-Copy
gadid 11
gosub Dir.g copy
xroutine copy
guiclose Dir.g
lvaction copy dir.gc $mlv_id $mlv_destdir ; copy all selected files/dirs
lvdir dir.gc $mlv_destid refresh ; refresh destination
;============================= copy new files
xbutton 0 30 0 15 "Copy New"
gadid 11
guiclose Dir.g
lvaction copynew dir.gc $mlv_id $mlv_destdir
lvdir dir.gc $mlv_destid refresh
;=============================== Move
xbutton 0 45 0 15 Move->
gadid 2
gosub Dir.g move
xbutton 0 45 0 15 <-Move
gadid 22
gosub Dir.g move
xroutine move
guiclose Dir.g
lvaction move dir.gc $mlv_id $mlv_destdir
lvdir dir.gc $mlv_destid refresh
;============================== delete
xbutton 0 60 0 15 Delete
gadid 3
guiclose Dir.g
lvaction delete dir.gc $mlv_id REQ
;============================= rename
; This routine reads the dir listview in the normal first/next method
; using the lvmulti command.
xbutton 0 75 0 15 Rename
gadid 4
if $$LV_DIR < " " ; stop if it is the device list
stop
endif
lvmulti Dir.gc $mlv_id first ; get the first record
guiclose Dir.g
guiload :Dir.ren
guiopen Dir.ren
;============================== makedir
xbutton 0 90 0 15 MakeDir
gadid 5
guiload :dir.makedir
;#########################################################################
NEWFILE dir.g2 ; This is the pop-up on double-click gui.
WinBig 0 0 80 90 ""
WinType 00001000
winonmouse 30 7
xOnRMB
guiclose Dir.g2
xOnInactive
guiclose Dir.g2
xOnFail
ezreq "Error during operation" OK ""
;---------------> the Buttons
xbutton 0 0 0 15 Auto
guiclose dir.g2
FILENAME = $lv_file
rtn.option = 'run >nil:'
gosub dir.view ViewFile
xbutton 0 15 0 15 List
FILENAME = $lv_file
guiload :dir.read
guiopen dir.read
xbutton 0 30 0 15 Cli..
cd $$LV_DIR
guiclose dir.g2
setvar cl_Main '$lv_file '
guiopen dir.cli
update dir.cli 10 1 ; set it to CLI
xbutton 0 45 0 15 'Edit'
guiclose dir.g2
run '$DEF.EDITOR $lv_file'
xbutton 0 60 0 15 Execute
guiclose dir.g2
cli 'execute $lv_file'
xbutton 0 75 0 15 Rx
guiclose dir.g2
if $REXXOK != 1 ; ****** Check for Arexx
guiload :rexxcheck.g
if $REXXOK != 1 ; quit if rexxcheck failed
stop
endif
endif
cli 'rx $lv_file'
;#########################################################################
NEWFILE dir.g3 ; The more.. gui (from the RMB pop-up gui)
WinBig 0 0 160 105 ""
WinType 00001000
winonwin Dir.g 0 0
xOnRMB
guiclose Dir.g3
xOnInactive
guiclose Dir.g3
xOnOpen
setvar mlv_id $$LV_ID ; Get the id of the current lvdir
xOnClose
setwintitle dir.g3 "" ; because ezreq will change the wintitle..
;================================ buttons (left bank)
xbutton 0 0 40 15 << ; previous
guiopen dir.g
guiclose dir.g3
xbutton 40 0 40 15 >> ; next
guiopen dir.g4
guiclose dir.g3
xbutton 0 15 80 15 View
guiclose dir.g3
rtn.option = ''
mlv_id = $$LV_ID
lvmulti dir.gc $mlv_id first
while $lv_file > ""
FILENAME = $lv_file
gosub dir.view viewfile
lvmulti dir.gc $mlv_id next
endwhile
xbutton 0 30 80 15 Protect
guiclose dir.g3
guiload :dir.prot
guiopen dir.prot
xbutton 0 45 80 15 Size
guiclose dir.g3
lvaction SIZE dir.gc $mlv_id lv_size
ezreq 'Total size of files\n& dirs selected:\n$lv_size bytes.\n' OK ""
xbutton 0 60 80 15 Shell
guiclose dir.g3
cd $$LV_DIR
run 'newshell "con:0/150/680/120/Gui4Cli/auto/close"'
xbutton 0 75 80 15 'CliGui'
cd $$LV_DIR
guiclose dir.g3
setvar cl_Main ''
guiopen dir.cli
update dir.cli 10 1 ; set it to CLI
xbutton 0 90 80 15 Info
ifexists file c:info
;
else
ezreq "Need the c:info command!" OK ""
stop
endif
cli 'c:info >ram:t/infofile'
FILENAME = ram:t/infofile
guiload :dir.read
guiopen dir.read
; ------------------ Buttons right bank
xbutton 80 0 80 15 User..
guiload :dir.user
guiclose dir.g3
xbutton 80 15 80 15 Find
guiclose dir.g3
guiload :dir.find
guiopen dir.find
xbutton 80 30 80 15 Search
guiclose dir.g3
guiload :dir.search
guiopen dir.search
xbutton 80 45 80 15 Hex
lvmulti dir.gc $$LV_ID first
if $lv_file > ""
run '$DEF.HEX $lv_file'
else
ezreq 'No file chosen' OK ""
endif
xbutton 80 60 80 15 Config
guiclose dir.g3
guiload :dir.config
xbutton 80 75 80 15 Help
extract dir.gc guipath lv_path
joinfile $lv_path dir.guide lv_guide
run '$DEF.GUIDE $lv_guide'
delvar lv_path
delvar lv_guide
xbutton 80 90 80 15 Quit
guiclose dir.g3
ezreq "QUIT ???!!.. Who, me ?\n" 'DIE!|Well..' lv_ask
if $lv_ask = 1
guiquit dir.gc
endif
;#########################################################################
NEWFILE dir.g4 ; The more->more.. gui (from the RMB pop-up gui)
; Define your own functions here...
WinBig 0 0 160 105 ""
WinType 00001000
winonwin Dir.g3 0 0
xOnRMB
guiclose Dir.g4
xOnInactive
guiclose Dir.g4
;================================ buttons (left bank)
xbutton 0 0 80 15 <<
guiopen dir.g3
guiclose dir.g4
xbutton 0 15 80 15 Calc
guiclose dir.g4
guiload :dir.calc
xbutton 0 30 80 15 Lock
guiclose dir.g4
guiload :dir.lock
xbutton 0 45 80 15 PPShow
guiclose dir.g4
guiload :dir.ppshow
xbutton 0 60 80 15 Replace
guiclose dir.g3
guiload :dir.rep
guiopen dir.rep
xbutton 0 75 80 15 GfxCon
guiclose dir.g4
guiload :dir.gfxcon
xbutton 0 90 80 15 Avail
guiclose dir.g4
guiload :dir.avail
; ------------------ Buttons right bank
xbutton 80 0 80 15 'LHa Pack'
guiclose dir.g4
guiload :dir.lha
xbutton 80 15 80 15 ReWrap
guiclose dir.g4
guiload :dir.wrap
xbutton 80 30 80 15 ""
xbutton 80 45 80 15 ""
xbutton 80 60 80 15 ""
xbutton 80 75 80 15 ""
xbutton 80 90 80 15 ""